<?php

namespace Common\Bundle\LibraryBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;

/**
 * Reponse
 *
 * @ORM\Table("reponse")
 * @ORM\Entity(repositoryClass="Common\Bundle\LibraryBundle\Entity\Repository\ReponseRepository")
 */
class Reponse
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="libelle", type="string", length=255)
     * @Assert\NotBlank()
     */
    private $libelle;

    /**
     * @var integer
     *
     * @ORM\Column(name="ordre", type="integer", nullable=true)
     */
    private $ordre;

    /**
     * @var boolean
     *
     * @ORM\Column(name="estCorrecte", type="boolean")
     */
    private $estCorrecte;

    /**
     * @var Question
     * @ORM\ManyToOne(targetEntity="Common\Bundle\LibraryBundle\Entity\Question", inversedBy="reponses")
     */
    private $question;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set libelle
     *
     * @param string $libelle
     * @return Reponse
     */
    public function setLibelle($libelle)
    {
        $this->libelle = $libelle;

        return $this;
    }

    /**
     * Get libelle
     *
     * @return string 
     */
    public function getLibelle()
    {
        return $this->libelle;
    }

    /**
     * Set ordre
     *
     * @param integer $ordre
     * @return Reponse
     */
    public function setOrdre($ordre)
    {
        $this->ordre = $ordre;

        return $this;
    }

    /**
     * Get ordre
     *
     * @return integer 
     */
    public function getOrdre()
    {
        return $this->ordre;
    }

    /**
     * Set estCorrecte
     *
     * @param boolean $estCorrecte
     * @return Reponse
     */
    public function setEstCorrecte($estCorrecte)
    {
        $this->estCorrecte = $estCorrecte;

        return $this;
    }

    /**
     * Get estCorrecte
     *
     * @return boolean 
     */
    public function getEstCorrecte()
    {
        return $this->estCorrecte;
    }

    /**
     * @param \Common\Bundle\LibraryBundle\Entity\Question $question
     */
    public function setQuestion($question)
    {
        $this->question = $question;
    }

    /**
     * @return \Common\Bundle\LibraryBundle\Entity\Question
     */
    public function getQuestion()
    {
        return $this->question;
    }

}
